const btns = {
  delete: (h, params, vm) => {
    return h(
      'div',
        [h('Poptip', {
          props: {
            confirm: true,
            title: '你确定要删除吗?'
          },
          on: {
            'on-ok': () => {
              vm.$emit('on-delete', params)
              vm.$emit('input', params.tableData.filter((item, index) => index !== params.row.initRowIndex))
            }
          }
        }, [
          h('Button', {
            props: {
              type: 'text',
              ghost: true
            }
          }, [
            h('Icon', {
              props: {
                type: 'md-trash',
                size: 18,
                align: 'center',
                color: '#000000'
              }
            })
          ])
        ]),
          h('Poptip', {
            props: {
              confirm: true,
              title: '你确定要修改吗?'
            },
            on: {
              'on-ok': () => {
                vm.$emit('on-delete', params)
                vm.$emit('input', params.tableData.filter((item, index) => index !== params.row.initRowIndex))
              }
            }
          }, [
            h('Button', {
              props: {
                type: 'text',
                ghost: true
              }
            }, [
              h('Icon', {
                props: {
                  type: 'md-construct',
                  size: 18,
                  align: 'center',
                  color: '#000000'
                }
              })
            ])
          ]),
          h('Poptip', {
            props: {
              confirm: true,
              title: '你确定要修改密码吗?'
            },
            on: {
              'on-ok': () => {
                vm.$emit('on-delete', params)
                vm.$emit('input', params.tableData.filter((item, index) => index !== params.row.initRowIndex))
              }
            }
          }, [
            h('Button', {
              props: {
                type: 'text',
                ghost: true
              }
            }, [
              h('icons', {
                props: {
                  type: 'edit',
                  size: 18,
                  align: 'center',
                  color: '#000000'
                }
              })
            ])
          ])
      ])
  },
}

export default btns
